from django.db import models
from django.contrib.auth.models import User
import datetime
from cms.models import CMSPlugin

class employ_class(models.Model):
    name = models.CharField(max_length=100)
    user_id = models.ForeignKey(User)
    data_ur = models.DateField(default=datetime.date.today())
    e_mail = models.CharField(max_length=20)
    tel_num = models.CharField(max_length=9)

    def __unicode__(self):
        return self.name

class boss(models.Model):
    boss_name = models.ForeignKey(employ_class)
    boss_under = models.ForeignKey( employ_class, related_name='+', unique=True)

class EmployPlugin(CMSPlugin):
    user = models.ForeignKey(employ_class)